package cn.hyy.hrm.mapper;

import cn.hyy.hrm.domain.Course;
import cn.hyy.hrm.query.CourseQuery;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hyy
 * @since 2020-04-02
 */
@Service
public interface CourseMapper extends BaseMapper<Course> {
    IPage<Course> selectByQuery(Page<Object> objectPage, @Param("query") CourseQuery query);

    /**
     * 批量上线
     * @param time
     * @param ids
     */
    void onLine(@Param("time") long time, @Param("ids") List<Long> ids);

    /**
     * 批量下线
     * @param time
     * @param ids
     */
    void offLine(@Param("time") long time, @Param("ids") List<Long> ids);
}
